package com.liu.ourchat.customer.receiver;


import io.swagger.annotations.Api;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.rabbit.annotation.RabbitListeners;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
@RabbitListeners({
        @RabbitListener(queues = "TestDirectQueue"),//监听的队列名称 TestDirectQueue
})

@Api(tags = "直连接收器")
public class DirectReceiver {
    @RabbitHandler
    public void process(Map testMessage) {
        System.out.println("DirectReceiver消费者收到消息  : " + testMessage.toString());
    }

}
